In [1]:
import glstring
print(glstring.__file__)
In [8]:
from glstring.glstring import *
a = "HLA-A*01:01/HLA-A*01:02+HLA-A*24:02|HLA-A*01:03+HLA-A*24:03^HLA-B*44:01+HLA-B*44:02"
print(a)
In [9]:
get_alleles(a)
Out[9]:
In [10]:
get_loci(a)
Out[10]:
^
.
In [11]:
get_locus_blocks(a)
Out[11]:
|
In [13]:
get_genotype_list_blocks(a)
Out[13]:
+
In [14]:
get_genotype_blocks(a)
Out[14]:
|
delimiters, which separate the possible genotypes. There is one genotype list in this example.
In [15]:
get_genotype_lists(a)
Out[15]:
+
delimiter and may contain allele lists
In [16]:
get_genotypes(a)
Out[16]:
/
delimiter
In [17]:
get_allele_lists(a)
Out[17]:
In [31]:
a = ("HLA-A*01:01/HLA-A*01:02+HLA-A*24:02|HLA-A*01:03+HLA-A*24:03^"
"HLA-B*08:01+HLA-B*44:01/HLA-B*44:02^"
"HLA-C*01:02+HLA-C*01:03^"
"HLA-DRB5*01:01~HLA-DRB1*03:01+HLA-DRB1*04:07:01/HLA-DRB1*04:92~HLA-DRB1*03:01")
print(a)
In [32]:
get_loci(a)
Out[32]:
In [33]:
get_alleles(a)
Out[33]:
In [34]:
get_allele_lists(a)
Out[34]:
In [35]:
get_genotypes(a)
Out[35]:
In [36]:
get_genotype_lists(a)
Out[36]:
In [37]:
get_locus_blocks(a)
Out[37]:
In [38]:
get_genotypes(get_locus_blocks(a)[0])
Out[38]:
In [39]:
get_genotypes(get_locus_blocks(a)[1])
Out[39]:
In [40]:
get_allele_lists(get_genotypes(get_locus_blocks(a)[0])[0])
Out[40]:
In [41]:
get_alleles(get_allele_lists(get_genotypes(get_locus_blocks(a)[0])[0])[0])
Out[41]:
In [42]:
get_haplotypes(a)
Out[42]:
In [ ]:
In [ ]: